<page-header-wrapper title="员工管理"> </page-header-wrapper>

<nz-card class="search-box">
  <div nz-row nzGutter="8">
    <div nz-col [nzSpan]="6">
      <sf #sf [schema]="searchSchema" [ui]="{ '*': { spanLabelFixed: 90, grid: { span: 24 } } }" [compact]="true" [button]="'none'"></sf>
    </div>
    <div nz-col [nzSpan]="8" nzOffset="1">
      <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['SYSTEM-STAFF-list']"
        >查询</button
      >
      <button nz-button (click)="resetSF()">重置</button>
    </div>
  </div>
</nz-card>

<nz-card class="content-box">
  <div class="d-flex justify-content-between mb-sm">
    <label style="font-size: 18px"></label>
    <div>
      <button nz-button nzType="primary" (click)="staffAction()" acl [acl-ability]="['SYSTEM-STAFF-add']">添加员工</button>
      <button nz-button acl [acl-ability]="['SYSTEM-STAFF-export']" (click)="exportList()">导出</button>
    </div>
  </div>

  <div class="mb-md">
    <nz-alert [nzType]="'info'" [nzShowIcon]="true" [nzMessage]="message">
      <ng-template #message>
        已选择
        <strong class="text-primary">{{ selectedRows.length }}</strong
        >项
      </ng-template>
    </nz-alert>
  </div>

  <st
    #st
    [data]="service.$api_get_enterprise_staff_page"
    [columns]="columns"
    [page]="{}"
    [req]="{ params: { nameOrPhone: this.sf?.value?.nameOrPhone } }"
    [loading]="false"
    [scroll]="{ y: '370px' }"
    (change)="stChange($event)"
  ></st>
</nz-card>
